﻿<?php
	include_once "plugin/ezsql/ez_sql_core.php";
	include_once "plugin/ezsql/ez_sql_mysql.php";
	
	//$db = new ezSQL_mysql('root','11111111','lab','localhost:3306');
	$db = new ezSQL_mysql('zerninn1_dblink','zerninn1_dblink','zerninn1_lab','localhost');
?>
<!DOCTYPE html> 
<html lang="zh-CN" class="ua-windows ua-webkit"> 
	<head> 
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 
		<title>I MISS U, WHAT'S THE MEANING OF THIS WORD ?</title> 
		
		<meta http-equiv="Pragma" content="no-cache"> 
		<meta http-equiv="Expires" content=""> 
		<link rel="stylesheet" href="themes/seven/style.css" type="text/css" media="screen, projection">
		<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" charset="UTF-8"></script>
		<style type="text/css">
			#tooltip {padding: 10px 15px;max-width:520px;position: absolute;font-size: 14px;font-family: Helvetica;color: #4E4E4E;background: #C4E424;z-index: 100;}
		</style>
	<head>
	</head>
<body>
<div id="missing" class="container">
	<div id="heart">
<?php
//$datas = $db->get_row("SELECT count(*) cnt FROM data");
$datas = $db->get_results("SELECT id,content,create_date FROM data WHERE CONTENT <> \"\" ORDER BY RAND() DESC,id desc");
//for ($i=1; $i<=$datas->cnt; $i++) {
//for ($i=1; $i<=8800; $i++) {
foreach ( $datas as $data ) {
  echo "<a href=\"#\" title=\"". $data->content ."\"><img src=\"themes/seven/images/red-heart.gif\" alt=\"\" title = \"\" /></a>";
}
?>
	</div>
	<div id="mic"></div>
	<div id="mainShow" class="w_720">
		<form action="action.php" method="POST">
			<div id="wordsOuter">
				<textarea name="words" id="words">MISS 是错过还是想念？</textarea>
			</div>
			<div id="postButtonOuter">
				<input type="submit" value="I MISS U, Give Me Your Answer." id="postButton">
			</div>
		</form>
	</div>

</div>

</body>

		<script type="text/javascript">

				(function($){

					$('body').append('<div id="tooltip"></div>');

					$('#tooltip').hide();

					var $tooltip = $('#tooltip');

				    $('a').each(function(){

				        var $this = $(this),

							$title = this.title;

							

				        $this.hover(function(){

							this.title = '';

							$tooltip.text($title).show();

				        }, function(){

							this.title = $title;

							$tooltip.text('').hide();

				        });

						

						$this.mousemove(function(e){

							$tooltip.css({

								top: e.pageY - 10,

								left: e.pageX + 20

							});

						});

				    });

				})(jQuery);

		</script>
</html>